<?php

namespace Home\Controller;

use Think\Controller;

class PageController extends Controller {

    function _empty() {
        header("HTTP/1.0 404 Not Found"); //使HTTP返回404状态码
        $this->display("Public:404");
    }

    public function index() {
        $this->show();
    }

    public function plugin($id = null) {
        if ($id == null) {
            $this->_empty();
        } else {
            $pluginmodel = M('Plugin');
            $plugin = $pluginmodel->where("id=$id")->select();
            $this->assign('plugin', $plugin);
        }
    }

    
    public function template(){
        $this->show();
    }

}
